import { HTTP } from '../utils/http'
import mpx from '@mpxjs/core'
import apiProxy from '@mpxjs/api-proxy'

mpx.use(apiProxy, {
  usePromise: true
})

class MyBankCardModel extends HTTP {
  // 获取我的银行卡列表
  async unbundling(data = {}) {
    const res = await this.request({
      url: '/sea/api/1.0/client/v1/xinshui/remove_bind',
      data,
      method: 'POST'
    })
    return res
  }

  // 绑定银行卡
  async bindMyBankCard(data = {}) {
    const res = await this.request({
      url: '/sea/api/1.0/client/v1/xinshui/bind',
      data,
      method: 'POST'
    })
    return res
  }

  // 获取银行列表
  async getBankList(data = {}) {
    console.log('dataaaaaaaaa', data)
    const res = await this.request({
      url: '/sea/api/1.0/client/v1/xinshui/user/info',
      data,
      method: 'POST'
    })
    return res
  }
}

export { MyBankCardModel }
